<!--单选组-->
<template >
    <el-radio-group v-model="value"
                    :style="style"
                    :id="id"
                    :name="name"
                    :bindProp="bindProp"
                    :class="cls"
                    :placeholder="placeholder"
                    @change="_controlOnUpdate"
            >
        <el-radio v-for="item in data" :label="item.value" >{{item.display}}</el-radio>
    </el-radio-group>
</template>

<script>
    exports = {
        templateType:'vue',
        data: function () {
            return {
                id:'',
                name:'',
                data:[],
                bindProp:'',
                value: '',
                style:'',
                cls:'',
                placeholder:''
            }
        },
        methods:{
            _controlOnUpdate:function(v,ov){
                var key = this.bindProp;
                this.onUpdate&&this.onUpdate(key,v,ov); //外部构造的方法调用
            }
        }
    }
</script>

<style>

</style>